<%@ page language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<% String email = request.getParameter("email");
   String password = request.getParameter("pass");
   ResultSet rsdoLogin = null;
   PreparedStatement psdoLogin=null;
      	
   	Connection conn = null;
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/database","root", "");
    
    String sqlOption="SELECT * FROM user where email="+email;
    psdoLogin=conn.prepareStatement(sqlOption);
    rsdoLogin=psdoLogin.executeQuery();
    if(rsdoLogin.wasNull()){
    	//error user onbekend
    }
    else if(rsdoLogin.next()){
    	if(rsdoLogin.getString(pass).equals(password)){
    		//<script type="text/javascript">window.location = "home.jsp";</script> 
    		
    	}
    
	    else{
	    	//error no password
	    }
    }
    %>
</body>
</html>